package com.sunshine.lnuplusweb.config;

import com.sunshine.lnuplusweb.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 登录拦截器配置
 */
@Configuration
public class LoginMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor())
                .addPathPatterns("/import_lesson")
                .addPathPatterns("/schedule")
                .addPathPatterns("/lesson")
                .addPathPatterns("/schedule_setting");
    }
}
